Question: Alex needs to borrow $\$10,\!000$ from the bank. The bank gives him two options.

1. A ten-year loan with an annual interest rate of $10\%$ compounded quarterly, with the condition that at the end of 5 years, Alex must make a payment equal to half of what he owes.  The other half continues to accrue interest, and at the end of the ten years, Alex will pay off the remaining balance.

2. A ten-year loan with a simple annual interest rate of $12\%$, with just one lump-sum payment at the end of the ten years.

Find the positive difference between the total amounts Alex has to pay back under the two schemes. Round your answer to the nearest dollar.
Explanation: For the compounded interest, we use the formula $A=P\left(1+\frac{r}{n}\right)^{nt}$, where $A$ is the end balance, $P$ is the principal, $r$ is the interest rate, $t$ is the number of years, and $n$ is the number of times compounded in a year.

First we find out how much he would owe in $5$ years, which is $$\$10,\!000\left(1+\frac{0.1}{4}\right)^{4 \cdot 5} \approx \$16,\!386.16$$

He pays off half of it in $5$ years, which is $\frac{\$16,\!386.16}{2}=\$8193.08$ He has $\$8193.08$ left to be compounded over the next $5$ years. This then becomes $$\$8193.08\left(1+\frac{0.1}{4}\right)^{4 \cdot 5} \approx \$13,\!425.32$$

He has to pay back a total of $\$8193.08+\$13,\!425.32=\$21,\!618.40$ in ten years if he chooses the compounding interest.

For the simple interest, he would have to pay $0.12 \cdot 10000=1200$ dollars per year. This means he would have to pay a total of $10000+10 \cdot 1200=22000$ dollars in ten years.

Therefore, he should choose the compounded interest and save $\$22000-\$21618.40=\$381.6 \approx \boxed{382 \text{ dollars}}$.